home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 10721 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.7 KB

  1. Path: inforamp.net!ts6-06
  2. From: rmorin@inforamp.net (Randy Charles Morin)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Help with key press events in BC OWL
  5. Date: Sat, 09 Mar 96 19:37:14 GMT
  6. Organization: MiddleWorld SoftWare
  7. Message-ID: <4hsmln$rsm@sam.inforamp.net>
  8. References: <4hn37o$f5v@soap.news.pipex.net>
  9. NNTP-Posting-Host: ts6-06.tor.inforamp.net
  10. X-Newsreader: News Xpress Version 1.0 Beta #4
  11.  
  12. In article <4hn37o$f5v@soap.news.pipex.net>,
  13.    Wayne Smith <fj89@dial.pipex.com> wrote:
  14. >Can anyone tell me why my OWL application which has a response table, will 
  15. call 
  16. >handlers for mouse button down, mouse move etc, but not any of the handlers 
  17. for key 
  18. >presses eg WM_CHAR WM_SYSKEYDOWN etc. I have correctly included the EV_ 
  19. macros in the 
  20. >response table. I have set up a test application which has a TDialog as the 
  21. main 
  22. >window, with two buttons ok/cancel and tried EV_WM_CHAR, EV_WM_SYSKEYDOWN, 
  23. >EV_WM_KEYDOWn in it, also to no avail, whilst the mouse handlers work fine.
  24.  
  25. I'm assuming you have a button OK and that you want to capture a keystroke 
  26. denoting that the button has been pressed.  This is normally the ENTER key, 
  27. the SPACEBAR and even sometimes the ALT-O combination.  If this is not what 
  28. you trying to do then these comments do not apply.
  29.  
  30. Windows autmatically processes the ENTER and SPACEBAR keys for you if you do 
  31. the following things.  Set the control ID of the OK button to 1 and make it a 
  32. default pushbutton.  You can make the ALT-O key combination work if you set 
  33. the button text to &OK.  This informs the user and windows that the ALT-O and 
  34. sometimes just O keystrokes will activate that button.  In this case, their is 
  35. no need to handle the EV_WM_CHAR, EV_WM_SYSKEYDOWN and EV_WM_KEYDOWN messages.
  36.  
  37. Agrivar
  38.